package io.mybatis.example.springboot.model;

import io.mybatis.provider.Entity;
import org.apache.ibatis.type.JdbcType;

import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * sys_dept - 部门表
 *
 * @author mkj
 */
@Getter
@Setter
@Entity.Table("sys_dept" remark = "部门表", autoResultMap = true)
public class SysDeptDO {
  @Entity.Column(value = "dept_id", id = true, remark = "部门id", updatable = false, insertable = false)
  private Long deptId;

  @Entity.Column(value = "parent_id", remark = "父部门id")
  private Long parentId;

  @Entity.Column(value = "ancestors", remark = "祖级列表")
  private String ancestors;

  @Entity.Column(value = "dept_name", remark = "部门名称")
  private String deptName;

  @Entity.Column(value = "order_num", remark = "显示顺序")
  private Integer orderNum;

  @Entity.Column(value = "leader", remark = "负责人")
  private String leader;

  @Entity.Column(value = "phone", remark = "联系电话")
  private String phone;

  @Entity.Column(value = "email", remark = "邮箱")
  private String email;

  @Entity.Column(value = "status", remark = "部门状态（0正常 1停用）")
  private String status;

  @Entity.Column(value = "del_flag", remark = "删除标志（0代表存在 2代表删除）")
  private String delFlag;

  @Entity.Column(value = "create_by", remark = "创建者")
  private String createBy;

  @Entity.Column(value = "create_time", remark = "创建时间", jdbcType = JdbcType.TIMESTAMP)
  private Date createTime;

  @Entity.Column(value = "update_by", remark = "更新者")
  private String updateBy;

  @Entity.Column(value = "update_time", remark = "更新时间", jdbcType = JdbcType.TIMESTAMP)
  private Date updateTime;

}
